Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64: FP SIMD arithmetic/rounding instructions #634

Merged
merged 1 commit into from
Jun 20, 2022
Merged

arm64: FP SIMD arithmetic/rounding instructions #634

merged 1 commit into from
Jun 20, 2022

Conversation

mathetake
Copy link
Member

This implements floating point SIMD arithmetics and rounding
instructions for arm64 backend.

Notably, now arm64 passes simd_f32x4_arith.json, simd_f64x2_arith,
simd_f64x2, simd_f32x4, simd_f32x4_rounding, simd_f64x2_rounding
spectests.

Signed-off-by: Takeshi Yoneda takeshi@tetrate.io

@@ -2899,283 +2899,260 @@ func (a *AssemblerImpl) EncodeStaticConstToVectorRegister(n *NodeImpl) (err erro
// advancedSIMDAcrossLanes holds information to encode instructions as "Advanced SIMD two-register miscellaneous" in
// https://developer.arm.com/documentation/ddi0596/2021-12/Index-by-Encoding/Data-Processing----Scalar-Floating-Point-and-Advanced-SIMD?lang=en
var advancedSIMDTwoRegisterMisc = map[asm.Instruction]struct {
U, Opcode byte
// TODO: extract common implementation of qAndSizeResolver.
qAndSizeResolver func(arrangement VectorArrangement) (Q, Size byte, err error)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did the refactoring again, but nothing interesting... just decided to use map instead of anonymous functions
as this was getting hairy :D

@mathetake mathetake marked this pull request as ready for review June 18, 2022 01:41
@mathetake

This comment was marked as resolved.

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Copy link
Contributor

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and sensible naming also

@mathetake mathetake merged commit 470c20e into main Jun 20, 2022
@mathetake mathetake deleted the arith branch June 20, 2022 00:04
mathetake added a commit that referenced this pull request Jun 20, 2022
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants